package com.lsh.oms.core.utils;

import java.util.Calendar;

/**
 * @author huangdong
 * @date 17/1/12
 */
public class OMSUtils {

    public static int currentTime() {
        return (int) (System.currentTimeMillis() / 1000);
    }

    public static int currentDate() {
        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return (int) (cal.getTimeInMillis() / 1000);
    }


    public static int mapSize(int dataSize){

        return (int) ((dataSize / 0.75) + 1);
    }
}
